package com.atguigu.acl.mapper;

import com.atguigu.acl.entity.Menu;
import com.atguigu.acl.entity.RoleMenu;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author smday
 * @since 2020-08-10
 */
public interface RoleMenuMapper extends BaseMapper<RoleMenu> {

    /**
     *  根据管理员ID获取对应菜单
     */
    List<Menu> getMenuList(Long adminId);

    /**
     * 根据角色id获取对应菜单
     */
    List<Menu> getMenuListByRoleId(Long roleId);


    /**
     * 批量新增roleMenu
     */
    int insertList(@Param("list") List<RoleMenu> roleMenuList);
}
